<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.hz.util.*" %>
<%@page import="com.hz.model.Hobby"%>
<%@page import="com.hz.control.HobbyControl"%>
 <%
      request.setCharacterEncoding("UTF-8");
      Hobby project = new Hobby();
      int tid=ParamUtil.getInt(request,"projectid",0);
	  String typename = new String(request.getParameter("projectname").getBytes("iso8859-1"),"utf-8");
	  project.setId(tid);
	  project.setHobbyName(typename);
	  boolean isSuccess = HobbyControl.AddHobby(project);
	  String returnJson = "{\"status\":\"" + (isSuccess ?  1 : 0) + "\"}";
  %>
 <%=returnJson %>